
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-conda-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> # Script to run QAP
> library(sna)
Loading required package: statnet.common

Attaching package: 'statnet.common'

The following objects are masked from 'package:base':

    attr, order

Loading required package: network

'network' 1.18.1 (2023-01-24), part of the Statnet Project
* 'news(package="network")' for changes since last version
* 'citation("network")' for citation information
* 'https://statnet.org' for help, support, and other information

sna: Tools for Social Network Analysis
Version 2.7-1 created on 2023-01-24.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
 For citation information, type citation("sna").
 Type help(package="sna") to get started.

Warning messages:
1: package 'sna' was built under R version 4.2.3 
2: package 'statnet.common' was built under R version 4.2.3 
3: package 'network' was built under R version 4.2.3 
> 
> # Load the followers adjacency matrix
> y <- readRDS("processed_data/retweets_adjacencyMatrix.Rds")
> # Load the predicting matrix 
> load("processed_data/QAP_predicting_matrices_2.RData")
> 
> # Non Parallel implementation to run QAP
> start.time <- Sys.time()
> # Set seed value 
> seed_value <- 81
> set.seed(seed_value)
> # Run netlm
> qap_res <- netlm(y, predicting_matrices, reps = 5)
> end.time <- Sys.time()
> time.taken <- end.time - start.time
> time.taken
Time difference of 12.24627 hours
> 
> # Save results 
> file_name <- paste0("output/qap_res_retweets_out", seed_value, ".Rds")
> saveRDS(qap_res, file=file_name)
> 
> proc.time()
     user    system   elapsed 
33324.267  9905.011 44274.298 
